.zxun {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
}

/* 头部样式 */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-btn {
  font-size: 20px;
  color: #333;
  cursor: pointer;
}

.chat-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.header-right {
  width: 20px;
}

/* 消息列表样式 */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.user-message {
  flex-direction: row-reverse;
}

.doctor-message {
  flex-direction: row;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-content {
  max-width: 70%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.user-message .message-content {
  align-items: flex-end;
}

.doctor-message .message-content {
  align-items: flex-start;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
  max-width: 100%;
}

.user-bubble {
  background-color: #007AFF;
  color: white;
  border-bottom-right-radius: 4px;
}

.doctor-bubble {
  background-color: #E5E5EA;
  color: #333;
  border-bottom-left-radius: 4px;
}

.message-text {
  font-size: 14px;
  line-height: 1.4;
}

.message-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  object-fit: cover;
}

.message-time {
  font-size: 12px;
  color: #999;
  margin: 0 5px;
}

/* 表情面板样式 */
.emoji-panel {
  background-color: #fff;
  border-top: 1px solid #eee;
  padding: 15px;
  max-height: 200px;
  overflow-y: auto;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.emoji-item {
  font-size: 24px;
  text-align: center;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.emoji-item:hover {
  background-color: #f0f0f0;
}

/* 输入区域样式 */
.chat-input {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background-color: #fff;
  border-top: 1px solid #eee;
  gap: 10px;
}

.input-right {
  display: flex;
  gap: 10px;
}

.input-center {
  flex: 1;
  display: flex;
  margin-right: 10px;
}

.input-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.input-icon:hover {
  background-color: #f0f0f0;
}

.image-icon {
  color: #666;
  transition: color 0.2s;
}

.image-icon:hover {
  color: #007AFF;
  background-color: #f0f0f0;
}

.text-input-main {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background-color: #f8f8f8;
}

.text-input-main:focus {
  border-color: #007AFF;
  background-color: white;
}


/* 响应式设计 */
@media (max-width: 480px) {
  .message-content {
    max-width: 80%;
  }
  
  .message-image {
    max-width: 150px;
    max-height: 150px;
  }
  
  .emoji-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
